import request from '../utils/request' //引入axios的封装方法
import cfg from '@/config/config'

//企业微信自己输入账号密码登录
export const  login = function(params) {
 return request('GET', cfg.apiUrl +'wXLogin/doLogin', params)
}

//首页获取员工信息
export const getUserInfor = function() {
  return request('post', cfg.apiUrl +'api/visitor/getUser')
 }

//企业微信验证是否进入登录或者主页
export const qywxVerifyLogin = function(params){
  return request('GET', cfg.apiUrl +'wXLogin/qywxVerifyLogin', params)
}

//企业微信正式员工自主登陆
export const qywxLogin = function(params){
  return request('GET', cfg.apiUrl +'wXLogin/qywxLogin', params)
}
//员工告知书确认阅读
export const userConfirm = function(params){
  return request('post', cfg.apiUrl +'api/stDevice/userConfirm', params)
}

//访客注册
export const visitorRegistration = function(params) {
  return request('post', cfg.apiUrl +'api/visitor/visitorRegister',params)
}
//发送短信验证码
export const smsVerification = function(params) {
  return request('post', cfg.apiUrl +'api/visitor/smsVerification',params)
}

//获取图片验证码
export const getVerificationImg = function(params){
  return request('get', cfg.apiUrl +'api/visitor/verification')
}
//访客登录
export const visitorLogining = function(params){
  return request('post', cfg.apiUrl +'api/visitor/visitorLogin',params)
}
//重置密码
export const resetPassword = function(params) {
  return request('post', cfg.apiUrl +'api/visitor/updateVistorPassword',params)
}


